<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
    function count()
    {
        var cnt=1;
        var gj=1;
        var mj=1;
        var xj=1;

        for(gj;gj<=20;gj++){
            if(mj>=35){
                mj=1;
            }
            for(mj;mj<=34;mj++){
                if(xj>=301){
                    xj=1;
                }
                for(xj;xj<=300;xj++){
                    if(((gj+mj+xj)==100)&&((gj*5+mj*3+xj/3)==100)){
                        console.log("公鸡"+gj+"只");
                        console.log("母鸡"+mj+"只");
                        console.log("小鸡"+xj+"只");
                    }
                    cnt++;
                }
            }
        }
        console.log("数了"+cnt+"次");
    }
    count();
    </script>
</head>
<body>
    
</body>
</html>